import {
  Button,
  Descriptions,
  message
} from 'antd';
import { PageHeaderWrapper, RouteContext } from '@ant-design/pro-layout';
import React, { Component, Fragment } from 'react';
import { connect, history } from 'umi';
import styles from './style.less';
import Sign from './sign'
import Record from './record'

class Advanced extends Component {
  componentDidMount() {
    const { dispatch,match } = this.props;
    dispatch({
      type: 'cubeSignIn/fetchVip',
      payload:{
        id:match.params.id
      }
    });
  }


  /**
   * 去绑卡
   */
  goToBindCard = () =>{
    message.warn("爆肝开发中！！！")
  }

  render() {
    const { currentVip } = this.props

    return (
      <PageHeaderWrapper
        className={styles.pageHeader}
      >
        <div className={styles.main}>
          <Sign currentVip={currentVip} id={this.props.match.params.id}/>
        </div>
      </PageHeaderWrapper>
    );
  }
}

export default connect(({ cubeSignIn, loading }) => ({
  currentVip:cubeSignIn.currentVip,
  loading: loading.effects['cubeSignIn/fetchVip'],
}))(Advanced);
